package com.czxy.demo02;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by hp on 2020/1/30.
 */
public class Test10 {
    public static void main(String[] args) {
        String[] strs = {"12","345","6789","1","123","4567"};
        List<String> list = new ArrayList<>();
        List<String> list2 = new ArrayList<>();
        for (String s : strs) {
            if (s.length()%2==0){
                list.add(s);
            }else if (s.length()%2!=0){
                list2.add(s);
            }
        }
        System.out.println("偶数长度字符串:"+list);
        System.out.println("奇数长度字符串:"+list2);
    }
}
